home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1616 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.7 KB

  1. Path: nntp.teleport.com!usenet
  2. From: slibert@teleport.com (Scott Libert)
  3. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++
  4. Subject: Re: Q: Dockable windows with tabs in MFC?
  5. Date: Thu, 11 Jan 1996 21:52:50 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4d40q3$99o@maureen.teleport.com>
  8. References: <4crfes$2qu@nms.telepost.no> <30F25A5E.31EC@us.oracle.com> <4d0f92$5v3@zeus.intellinet.com>
  9. NNTP-Posting-Host: ip-pdx06-21.teleport.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. RobertC@ProDentec.com (Robert Christian) wrote:
  13.  
  14. >Norman Scroggins <nscroggi@us.oracle.com> wrote:
  15.  
  16. >>Stian Barkbu wrote:
  17. >>> 
  18. >>> I am trying to create a dockable property sheet (tabbed
  19. >>> dialog), much like the project workspace in MSVC++ 4.0. Is
  20. >>> this possible at all?
  21. >>> 
  22. >>> I have managed to create a tabbed dialog box using the
  23. >>> CPropertySheet and CPropertyPage classes (or a TabCtrl), and I
  24. >>> can get a dockable window using CDialogBar. But, a dockable
  25. >>> window with a tab control seems impossible ( or, at least none
  26. >>> of my efforts have been successful so far).
  27. >>> Can anyone help me with this one?
  28. >>> 
  29. >>> Thanks.
  30. >>> 
  31. >>> Stian
  32. >>> snba@sesam.dnv.no
  33.  
  34. >>I myself have been trying to get some help doing this--with
  35. >>the added twist of having the tabs oriented on the bottom
  36. >>instead of the top.  Let's keep each other updated on a
  37. >>solution. Thanks.
  38.  
  39. >>--Norm
  40.  
  41. >I'm not certain, but it appears to me that Microsoft is actually
  42. >performing somewhat of a trick.  I don't think they are using property
  43. >pages, but rather a tab control placed under a tree control.  When you
  44. >select a tab, they hide one tree control and display another...maybe.
  45.  
  46. >Robert Christian
  47.  
  48. Just wanted to say I agree with Roger; I have implemented something
  49. just like that.  I have a CView-derived object which creates a
  50. CTabCtrl as as a child, then creates a CTreeCtrl as a child of the tab
  51. control.  And it all works.
  52.  
  53. The next step I am working on right now is to have the parent window
  54. be a CControlBar-derived class instead of CView.  I see no problem
  55. here.
  56.  
  57. A bigger problem, however, is how to get the "splitter" functionality
  58. to size the CControlBar-derived object.  Since I am using MDI, I can't
  59. use CSplitterWnd in the main frame, due to the assumptions made in the
  60. GetParentFrane() method of CMDIChildWnd.  My tack at this point is to
  61. implement special WM_NCPAINT handling to draw what looks like a
  62. spliitter bar and add WM_NCHITTEST, WM_NCLBUTTONDOWN & WM_NCMOUSEMOVE
  63. handling to show the "drag splitter" cursor and resize the window.
  64.  
  65. It seems once this is done the only thing left to do to perform the
  66. magic that MS does of changing the control bar window from/to a mdi
  67. child window is to change the parentage of the window.via SetParent().
  68.  
  69. - Scott L.
  70.  
  71.  
  72.  
  73.